package org.estela.ml.dataset;

import java.io.Externalizable;

public interface Attribute extends Cloneable, Externalizable {

	/**
	 * @return Returns the index.
	 */
	int getIndex();

	/**
	 * @param index The index to set.
	 */
	void setIndex(int index);

	/**
	 * @return Returns the name.
	 */
	String getName();

	/**
	 * @param name The name to set.
	 */
	void setName(String name);

	/**
	 * @return Returns the weight.
	 */
	double getWeight();

	/**
	 * @param weight The weight to set.
	 */
	void setWeight(double weight);
	
	/**
	 * 
	 * @param value
	 * @return
	 */
	double encode(Object value);

	/**
	 * 
	 * @param d
	 * @return
	 */
	Object decode(double d);

	/**
	 * 
	 * @return
	 */
	Attribute clone();
	
	/**
	 * 
	 * @return
	 */
	boolean isDiscrete();	
}